package com.atguigu.jxc.service.impl;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.atguigu.jxc.dao.GoodsInfoDao;
import com.atguigu.jxc.entity.GoodsType;
import com.atguigu.jxc.service.GoodsInfoService;
import com.google.gson.JsonObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class GoodsInfoServiceImpl implements GoodsInfoService {
    @Resource
    private GoodsInfoDao goodsInfoDao;

    @Override
    public String SelecetLoadGoodsType() {
        List<GoodsType> list = goodsInfoDao.SelecetLoadGoodsType();
        String jsonStr = JSONArray.toJSONString(list);
        System.out.println("jsonStr======"+jsonStr);
            return jsonStr;

    }
}
